#include <VolumeUnit.h>

const unsigned int OzVsTsp    = 3;
const unsigned int TspVsTbsp    = 4;
const unsigned int BASE_UNIT_VALUE = 1;

VolumeUnit::VolumeUnit(const unsigned int factor):factor(factor)
{
}

const VolumeUnit& VolumeUnit::getOZ( )
{
	static VolumeUnit oz(OzVsTsp*TspVsTbsp*BASE_UNIT_VALUE);
	return oz;
}

const VolumeUnit& VolumeUnit::getTSP( )
{
	static VolumeUnit tsp(TspVsTbsp*BASE_UNIT_VALUE);
	return tsp;
}

const VolumeUnit& VolumeUnit::getTBSP( )
{
	static VolumeUnit tbsp(BASE_UNIT_VALUE);
	return tbsp;
}

unsigned int VolumeUnit::toAmountInBaseUnit( ) const
{
	return factor;
}
